//
//  AlbumPictureViewController.h
//  album
//
//  Created by 云天 李 on 12-1-12.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <MessageUI/MessageUI.h>

@class Picture;

@interface AlbumPictureViewController : UIViewController
<UIScrollViewDelegate, UIActionSheetDelegate, MFMailComposeViewControllerDelegate>

// 当前相册
@property (strong, nonatomic) Picture *currentPicture;
// 相册内所有图片
@property (strong, nonatomic) NSMutableArray *pictures;
// 放置所有图片的UIScrollView
@property (strong, nonatomic) IBOutlet UIScrollView *scrollView;
// 当前页
@property (nonatomic, assign) NSUInteger currentPage;
// viewDisAppear时忽略UIScrollViewDelegate
@property (nonatomic, assign) BOOL ignoreUIScrollViewDelegate;

// 显示发送邮件界面
- (void)displayComposerSheet;

// 工具栏上的播放、暂停按钮
- (UIBarButtonItem *)createToolbarPlayItem:(UIBarButtonSystemItem)item;

// 用于自动播放的定时器
@property(strong, nonatomic) NSTimer *autoscrollTimer;

// 自动滚动图片
- (void)autoScrollPictures;
// 开始播放
- (void)autoscrollTimerFired:(NSTimer *)timer;
// 停止播放
- (void)stopAutoscroll;
// 自动播放时，更改按钮图片
- (void)changePlayItemTo:(UIBarButtonSystemItem)item;

@end
